#include <windows.h>
#include <mmsystem.h>
#include <iostream>
#include <cstdio>
#include <fstream>

#define NUM_OF_BUFFERS 200

class AudioSystem
{
	public:
		AudioSystem();
		void playBuffer(char* audioBuffer, int length);
		void extractHeaderInfo(FILE* fp);

	private:
		WAVEHDR headers[NUM_OF_BUFFERS];
		char* bufferData[NUM_OF_BUFFERS];
		HWAVEOUT audioDevice;
		WAVEFORMATEX format;
		int currentBuffer;
};
